# 与匿名函数相关的内置函数
# map
l = [1, 2, 3, 4]
res = map(lambda x: x + 1, l)
print(list(res))

# max min
print(max(l))
print(min(l))
d = {'a': 3, 'b': 2, 'c': 1}
print(max(d))
print(max(d, key=lambda key: d[key]))
# zip
l1 = [1, 2, 3]
l2 = [1, 2, 3, 4, 5, 6]
l3 = ['a', 'b']
print(list(zip(l1, l2)))
print(list(zip(l1, l2, l3)))
# filter
print(list(filter(lambda x: x > 3, l2)))
